package com.easy.module.generator.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * 读取相关配置
 *
 * @author easy
 */
@Getter
@Setter
@Component
@PropertySource(value = {"classpath:generator.properties"})
@ConfigurationProperties(prefix = "easy.generator")
public class GeneratorProperties {
    /**
     * 包名
     */
    private String packageName = "";

    /**
     * 作者
     */
    private String author = "";

    /**
     * 删除前缀
     */
    private List<String> removePrefix = new ArrayList<>();

    /**
     * 导入表时排除的表
     */
    private List<String> excludeTables = new ArrayList<>();

    /**
     * 排除生成实体的字段
     */
    private List<String> excludeFields = new ArrayList<>();

    /**
     * 排除表单的字段
     */
    private List<String> excludeFormFields = new ArrayList<>();

    /**
     * 排除列表的字段
     */
    private List<String> excludeListFields = new ArrayList<>();

    /**
     * 逻辑删除字段
     */
    private String logicDeleteField = "del_flag";
}
